package com.one.rope.mvp.web.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Weijian.Liu
 * @desc 推送状态枚举
 * @date 2020/2/20 14:47
 */
@Getter
@AllArgsConstructor
public enum MemberPushStatusEnum {

  WAIT_PUSH(1, "等待推送"),
  PUSH_SUCCESS(2, "推送成功"),
  PUSH_FAILURE(3, "推送失败");

  private int code;
  private String name;

  public static String getName(int code) {
    for (MemberPushStatusEnum o : MemberPushStatusEnum.values()) {
      if (o.code == code) {
        return o.name;
      }
    }
    return "";
  }
}
